home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / cat3 / readlink.3 < prev    next >
Encoding:
Text File  |  1993-03-03  |  1.4 KB  |  67 lines

  1.  
  2.  
  3.  
  4. READLINK(3)         MINTLIB LIBRARY FUNCTIONS         READLINK(3)
  5.  
  6.  
  7. N✓NA✓AM✓ME✓E
  8.        readlink - read value of a symbolic link
  9.  
  10. S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
  11.           #include <support.h>
  12.  
  13.        ?? int readlink(const char *path, char *buf, int bufsiz); // Should be like this
  14.           int readlink(char *path, char *buf, int bufsiz);
  15.  
  16. D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
  17.        readlink places the contents of the symbolic link referred
  18.        to by path in the buffer buf which has  size  bufsiz.  The
  19.        buffer  must  be  large  enough to hold the string and the
  20.        terminating null.
  21.  
  22. R✓RE✓ET✓TU✓UR✓RN✓N V✓VA✓AL✓LU✓UE✓ES✓S
  23.        readlink returns the number of characters  placed  in  the
  24.        buffer, minus the terminating zero. On failure, it returns
  25.        -1 and sets errno to indicate the error.
  26.  
  27. S✓SE✓EE✓E A✓AL✓LS✓SO✓O
  28.        l✓ls✓st✓ta✓at✓t(✓(3✓3)✓),✓, s✓sy✓ym✓ml✓li✓in✓nk✓k(✓(3✓3)✓),✓, F✓Fr✓re✓ea✓ad✓dl✓li✓in✓nk✓k(✓(2✓2)✓)
  29.  
  30. N✓NO✓OT✓TE✓ES✓S
  31.        On  UN*X,  the  contents  of  the  buffer  is  not   null-
  32.        terminated;  the size of the buffer as passed to the read-
  33.        link call is therefore off by one  when  compared  to  the
  34.        mintlibs.  It  is unlikely that this would ever be a prob-
  35.        lem.
  36.  
  37.        MS-DOS (TOS) file-systems do not support symbolic links.
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. MiNT docs 0.1              3 March 1993                         1
  65.  
  66.  
  67.